<template>
  <div class="container">
    <h1 class="title">Hello World</h1>
    <h2 class="test">{{ test }}</h2>
    <div>
      <router-link to="/">Home</router-link>
      <router-link to="/about">About</router-link>
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
import { ref, watchEffect } from 'vue';
import { useStore } from "vuex";

export default {
  name: 'App',
  setup(props) {
    const test = ref('');
    const store = useStore();

    watchEffect(() => {
      test.value = store.getters['GET_TEST'];
    })

    return {
      test
    }
  }
}
</script>

<style lang="less" scoped>
  .container {
    margin: 0;
    .title {
      color: orange;
    }
    .test {
      color: red;
    }
  }
</style>